﻿<script type="text/template" id="order-list-template">

<div class="nav pull-right">
    <a id="editSelected" class="btn" href="#"><i class="icon-edit"></i></a>            
    <a id="removeSelected" class="btn" href="#"><i class="icon-remove"></i></a>
</div>

<table class="table table-striped table-bordered">
    <tr>
        <th>Id</th>
        <th>Currency</th>
        <th>Status</th>
        <th>Customer</th>
    </tr>
    <% _.each(orders, function(order){%>
        <tr data-id="<%= order.Id %>">
            <td><%= order.Id %></td>
            <td><%= order.Currency %></td>
            <td><%= order.Status %></td>
            <td><%= order.Customer.Name %></td>
        </tr>
    <% }); %>
<table>
</script>
<script type="text/template" id="order-list-empty-template">
<div class="hero-unit">
    <h3>There are no orders available</h3>
</div>
</script>
<script type="text/template" id="order-form-template">
<div class="modal" id="orderForm">
  <div class="modal-header">
    <button class="close" data-dismiss="modal">×</button>
    <h3><%= action %> Order</h3>
  </div>
  <div class="modal-body">
    <form id="form" class="form-horizontal" data-action="<%= action %>" data-id="<%= orderId %>">
      <fieldset>
        <legend>Order Info</legend>

        <div class="control-group">
          <label class="control-label" for="orderCurrency">Currency</label>
          <div class="controls">
            <input type="text" class="input-xlarge" id="orderCurrency" value="<%= orderCurrency %>"/>
          </div>
        </div>

        <div class="control-group">
          <label class="control-label" for="orderStatus">Status</label>
          <div class="controls">
            <input type="text" class="input-xlarge" id="orderStatus" value="<%= orderStatus %>" />
          </div>
        </div>
      </fieldset>

      <fieldset>
        <legend>Customer Info</legend>
        <div class="control-group">
          <label class="control-label" for="customerName">Name</label>
          <div class="controls">
            <input type="text" class="input-xlarge" id="customerName" placeholder="John Doe" value="<%= customerName %>" />
          </div>
        </div>

        <div class="control-group">
          <label class="control-label" for="customerEmail">Email</label>
          <div class="controls">
            <input type="text" class="input-xlarge" id="customerEmail" placeholder="john.doe@gmail.com" value="<%= customerEmail %>" />
          </div>
        </div>
      </fieldset>
    </form>
  </div>
  <div class="modal-footer">
    <a id="closeModal" href="#" class="btn">Close</a>
    <a id="saveModal" href="#" class="btn btn-primary">Save</a>
  </div>
</div>
</script>
